<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="Matthias L. Jugel, Marcus Meissner">
   <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD Caldera Systems OpenLinux [en] (X11; U; Linux 2.4.13-ac7 i686) [Netscape]">
   <meta name="Description" content="Java Telnet Applet is a fully features Telnet and Terminal Emulation implementation for Java.">
   <meta name="Keywords" content="java telnet applet application bbs terminal emulation">
   <title>JTA - Telnet/SSH for the JAVA(tm) platform v2.0: Script Plugin</title>
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000">
&nbsp;
<center><table BORDER=0 CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" HEIGHT="20%" BGCOLOR="#000000" NOSAVE >
<tr NOSAVE>
<td ALIGN=RIGHT VALIGN=BOTTOM NOSAVE>
<table BORDER=0 CELLPADDING=5 COLS=5 WIDTH="100%" HEIGHT="100%" BGCOLOR="#FFFFFF" NOSAVE >
<tr NOSAVE>
<td ALIGN=RIGHT VALIGN=BOTTOM COLSPAN="5" NOSAVE>
<div ALIGN=right>
<h1>
<font face="Arial,Helvetica"><font color="#000099">
JTA - Telnet/SSH for the JAVA(tm) platform: Script Plugin</font></font></h1></div>
<i>&copy; 1996-2000 <a href="mailto:leo@mud.de">Matthias L. Jugel </a>and
<a href="mailto:marcus@mud.de">Marcus
Mei&szlig;ner</a></i>
<p><b>Version 2.0 / Java 2 and 1.1.x</b>
<br>Available under <a href="../../license/COPYING">GNU General Public License</a></td>
</tr>

<tr ALIGN=CENTER VALIGN=CENTER NOSAVE>
<td NOSAVE><b><font face="Arial,Helvetica"><a href="../../index.html">Homepage</a></font></b></td>

<td><b><font face="Arial,Helvetica"><a href="../../html/index.html">Applet
Test</a></font></b></td>

<td><b><font face="Arial,Helvetica"><a href="../../html/download.html">Download</a></font></b></td>

<td><b><i><font face="Arial,Helvetica"><a href="../index.html">Documentation</a></font></i></b></td>

<td><b><font face="Arial,Helvetica"><a href="../../html/users.html">Users
/ Opinions</a></font></b></td>
</tr>
</table>
</td>
</tr>
</table></center>

<table BORDER=0 CELLSPACING=5 CELLPADDING=5 COLS=2 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td ALIGN=LEFT VALIGN=TOP WIDTH="70%" BGCOLOR="#FFFFFF" NOSAVE>
<center>
<h2>
<font color="#CC0000">Script Plugin</font></h2></center>
To automate certain processes like login into guest accounts or BBS' the
script plugin enables you to write simple scripts of pattern and answer
pairs to be sent to the remote host if the pattern was found in the data
that came from the remote host.
<p>To use the script simply put it into the plugin list as described in
the configuration of the <a href="../Main.html">Application</a> or <a href="../Applet.html">Applet</a>.
The script language itself is very basic:
<blockquote><tt>pattern|text|pattern_1|text_1</tt></blockquote>
Any number of pattern and text pairs can be given and they will be processed
in the order they appear in the script. That means if <tt>pattern</tt>
is not matched <tt>pattern_1</tt> will not be processed! For example the
following script would login into some computer:
<blockquote><tt>login:|leo|password:|mypass</tt></blockquote>
It first waits for the pattern "<i>login:</i>" and sends the text "<i>leo\n</i>"
(\n is a newline). Then it waits for the pattern "<i>password:</i>" and
if that appears it sends "<i>mypass\n</i>". Next you could add some pattern
that looks like your command prompt and issue a shell command.
<p>If the first pattern is emtpy, its answer string will be sent on connect.
For instance:
<br>&nbsp;
<blockquote>
<pre>|connect foo|login:|leo|password:|mypass</pre>
</blockquote>
will send 'connect foo' upon connect.
<br>&nbsp;
<p>You can configure the plugin using the following properties:
<center><table BORDER=0 CELLPADDING=3 COLS=2 WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE CELLSPACjNG="3" >
<tr ALIGN=CENTER VALIGN=CENTER BGCOLOR="#000000" NOSAVE>
<td NOSAVE><b><font face="Arial,Helvetica"><font color="#FFFFFF">Property</font></font></b></td>

<td><b><font face="Arial,Helvetica"><font color="#FFFFFF">Documentation</font></font></b></td>
</tr>

<tr NOSAVE>
<td VALIGN=TOP NOSAVE><tt>Script.script</tt></td>

<td>This property contains the script that is used by the plugin.</td>
</tr>
</table></center>

<p><b>NOTE:</b>
<br>The Script plugin MUST be <b>BETWEEN</b> the Telnet or SSH Plugin and
the Terminal plugin.
<br>The order of plugins in the plugins line is important!
<p>&nbsp;Example:
<tt>plugins=Status,Socket,Telnet,Script,Terminal</tt></td>

<td ALIGN=LEFT VALIGN=TOP BGCOLOR="#CCCCCC" NOSAVE><font color="#CC0000">Additional
Programmer Documentation is available:</font>
<br>&nbsp;
<center><table BORDER=0 CELLSPACING=3 CELLPADDING=3 COLS=1 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td BGCOLOR="#FFFFFF" NOSAVE><b><font face="Arial,Helvetica"><font color="#000000"><a href="../source/de/mud/jta/plugin/Script.html">de.mud.jta.plugin.Script</a></font></font></b></td>
</tr>

<tr>
<td>This is the programmer documentation for the plugin. Use it as an example
if you want to write your own back end plugins.</td>
</tr>

<tr NOSAVE>
<td BGCOLOR="#FFFFFF" NOSAVE><b><font face="Arial,Helvetica"><a href="../source/de/mud/jta/event/package-summary.html">de.mud.jta.event</a></font></b></td>
</tr>

<tr>
<td>This plugins uses some of the events and listeners described here.</td>
</tr>
</table></center>
</td>
</tr>
</table>

<table BORDER=0 CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<tr NOSAVE>
<td NOSAVE>
<table BORDER=0 CELLSPACING=3 CELLPADDING=5 COLS=2 WIDTH="100%" HEIGHT="100%" BGCOLOR="#FFFFFF" NOSAVE >
<tr NOSAVE>
<td NOSAVE>Copyright 1996-2000 <a href="mailto:leo@mud.de">Matthias L.
Jugel</a>, <a href="mailto:marcus@mud.de">Marcus Mei&szlig;ner</a></td>

<td>
<div align=right><b><i>Get the <a href="http://www.mud.de/se/jta">latest
version here</a>!</i></b></div>
</td>
</tr>

<tr NOSAVE>
<td COLSPAN="2" NOSAVE>
<div align=right>$Id: Script.html,v 1.9 2001/05/22 06:35:37 marcus Exp
$</div>
</td>
</tr>
</table>
</td>
</tr>
</table>

</body>
</html>
